const pengfanModule = {
  namespaced: true,
  state() {
    return {
      name: "pengfan",
      age: 18,
      height: 1.71,
    };
  },
  getters: {
    realAge(state) {
      return state.age + 3;
    },
  },
  mutations: {
    changeName(state,payload) {
      state.name = payload;
    },
    changeHeight(state,payload) {
      state.height += payload;
    },
  },
  actions: {
    changeHeightAction(context,payloadAction) {
      context.commit("changeHeight",payloadAction);
    },
  },
};

export default pengfanModule;
